<?php

 $meta = array();

/*---------------------------------------------------------------------------*
 * Creatic : Meta Configuration
 *---------------------------------------------------------------------------*/

/* Front : Intro
/*---------------------------------------------------------------------------*/

$meta['sections']['front-intro'] = array(
	'title'		=> 'Intro',
	'page'		=> 'page',
	'template'	=> array('template-front.php','template-front-alt.php')
);

//! Heading
$meta[] = array(
	'id'		=> '_bandit_front_title',
	'label'		=> 'Heading',
	'section'	=> 'front-intro',
	'type'		=> 'text'
);

//! Subheading
$meta[] = array(
	'id'		=> '_bandit_front_subheading',
	'label'		=> 'Subheading',
	'section'	=> 'front-intro',
	'type'		=> 'textarea',
	'rows'		=> '4'
);


/* Front : Slider
/*---------------------------------------------------------------------------*/

$meta['sections']['front-slider'] = array(
	'title'		=> 'Slider',
	'page'		=> 'page',
	'template'	=> array('template-front.php','template-front-alt.php'),
	'callback'	=> 'FeatherTheme::front_slider_meta'
);

//! Sliders
$meta[] = array(
	'id'		=> '_bandit_slider',
	'label'		=> 'Slider',
	'section'	=> 'front-slider',
	'type'		=> 'select',
	'choices'	=> BanditSliders::get_sliders()
);

/* Front : Description
/*---------------------------------------------------------------------------*/

$meta['sections']['front-desc'] = array(
	'title'		=> 'Description',
	'page'		=> 'page',
	'template'	=> array('template-front.php','template-front-alt.php')
);

//! Description
$meta[] = array(
	'id'		=> '_bandit_front_desc',
	'label'		=> 'Description',
	'section'	=> 'front-desc',
	'type'		=> 'textarea',
	'rows'		=> '4'
);


/* Front : Buttons
/*---------------------------------------------------------------------------*/

$meta['sections']['front-buttons'] = array(
	'title'		=> 'Buttons',
	'page'		=> 'page',
	'template'	=> array('template-front.php','template-front-alt.php')
);

//! Button 1 Text
$meta[] = array(
	'id'		=> '_bandit_front_button1',
	'label'		=> 'Button 1 : Text',
	'section'	=> 'front-buttons',
	'type'		=> 'text',
	'class'		=> 'medium-text'
);

//! Button 1 Link
$meta[] = array(
	'id'		=> '_bandit_front_button_link1',
	'label'		=> 'Button 1 : Link',
	'section'	=> 'front-buttons',
	'type'		=> 'text'
);

//! Button 2 Text
$meta[] = array(
	'id'		=> '_bandit_front_button2',
	'label'		=> 'Button 2 : Text',
	'section'	=> 'front-buttons',
	'type'		=> 'text',
	'class'		=> 'medium-text'
);

//! Button 2 Link
$meta[] = array(
	'id'		=> '_bandit_front_button_link2',
	'label'		=> 'Button 2 : Link',
	'section'	=> 'front-buttons',
	'type'		=> 'text'
);


/* Front : Widgets
/*---------------------------------------------------------------------------*/

$meta['sections']['front-widgets'] = array(
	'title'		=> 'Wigets',
	'page'		=> 'page',
	'template'	=> array('template-front.php','template-front-alt.php'),
	'callback'	=> 'FeatherTheme::front_widget_meta'
);

/* Portfolio Template
/*---------------------------------------------------------------------------*/

$meta['sections']['template-portfolio'] = array(
	'title'		=> 'Portfolio',
	'page'		=> 'page',
	'template'	=> array('template-portfolio.php')
);

// Is portfolio enabled ?
if(FeatherTheme::get_option('theme_portfolio')):

	// Get portfolio categories
	$tmp_cats = get_categories(
		array(
			'taxonomy'	 => 'portfolio_category',
			'orderby'	 => 'name',
			'hide_empty' => 0
		)
	);
	$port_cats = array();
	$port_cat_templates = array();
	$port_cat_num = array('0' => 'All');
	// Loop port cats into array
	foreach($tmp_cats as $cat) {
		$port_cats[$cat->slug] = $cat->name;
	}
	// Templates
	for($i=1;$i<=12;$i++) {
		$port_cat_templates[$i]='Template '.$i;
	}
	// Number
	for($i=1;$i<=40;$i++) {
		$port_cat_num[$i] = $i;
	}

//! Category
$meta[] = array(
	'id'		=> '_bandit_portfolio_category',
	'label'		=> 'Category',
	'section'	=> 'template-portfolio',
	'type'		=> 'select',
	'choices'	=> $port_cats
);

//! Category Template
$meta[] = array(
	'id'		=> '_bandit_portfolio_template',
	'label'		=> 'Template',
	'section'	=> 'template-portfolio',
	'type'		=> 'select',
	'choices'	=> $port_cat_templates
);

//! Category Template
$meta[] = array(
	'id'		=> '_bandit_portfolio_num',
	'label'		=> 'Items Per Page',
	'section'	=> 'template-portfolio',
	'type'		=> 'select',
	'choices'	=> $port_cat_num
);

//! AJAX Navigation
$meta[] = array(
	'id'		=> '_bandit_portfolio_ajax',
	'label'		=> 'Ajax Navigation',
	'section'	=> 'template-portfolio',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_portfolio_ajax' => ''
	)
);

//! AJAX Navigation
$meta[] = array(
	'id'		=> '_bandit_portfolio_disable_cat',
	'label'		=> 'Hide Categories',
	'section'	=> 'template-portfolio',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_portfolio_disable_cat' => ''
	)
);

endif;


/* Front, Portfolio : Footer Widgets
/*---------------------------------------------------------------------------*/

$meta['sections']['front-footer-widgets'] = array(
	'title'		=> 'Footer Widgets',
	'page'		=> 'page',
	'template'	=> array(
		'template-front.php',
		'template-front-alt.php',
		'template-portfolio.php'
	)
);

//! Enable Footer Widgets
$meta[] = array(
	'id'		=> '_bandit_front_footer_widgets',
	'label'		=> 'Enable',
	'section'	=> 'front-footer-widgets',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_front_footer_widgets' => 'Enable footer widgets'
	)
);



/* Portfolio Post : Template
/*---------------------------------------------------------------------------*/

$meta['sections']['portfolio-template'] = array(
	'title'		=> 'Portfolio Post Template',
	'page'		=> 'portfolio'
);

//! Image Template
$meta[] = array(
	'id'		=> '_bandit_portfolio_template',
	'label'		=> 'Template',
	'section'	=> 'portfolio-template',
	'type'		=> 'select',
	'choices'	=> array(
		'1' => 'Template 1',
		'2' => 'Template 2',
		'3' => 'Template 3'
	)
);

//! Video Template
$meta[] = array(
	'id'		=> '_bandit_portfolio_video_template',
	'label'		=> 'Video Template',
	'section'	=> 'portfolio-template',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_portfolio_video_template' => 'Enable Video Template'
	)
);


/* Portfolio Post : TimThumb
/*---------------------------------------------------------------------------*/

$meta['sections']['portfolio-timthumb'] = array(
	'title'		=> 'Portfolio Thumbnail Alternative (optional)',
	'page'		=> 'portfolio'
);

//! Enable TimThumb
$meta[] = array(
	'id'		=> '_bandit_portfolio_timthumb',
	'label'		=> 'Use TimThumb for thumbnail',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_portfolio_timthumb' => ''
	)
);

//! Sharpen Image
$meta[] = array(
	'id'		=> '_bandit_portfolio_timthumb_sharpen',
	'label'		=> 'Sharpen Image (optional)',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_portfolio_timthumb_sharpen' => ''
	)
);

//! Greyscale
$meta[] = array(
	'id'		=>'_bandit_portfolio_timthumb_greyscale',
	'label'		=>'Greyscale (optional)',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'checkbox',
	'choices'	=> array(
		'_bandit_portfolio_timthumb_greyscale' => ''
	)
);

//! Image Quality
$meta[] = array(
	'id'		=> '_bandit_portfolio_timthumb_quality',
	'label'		=> 'Image Quality (optional)',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'text',
	'class'		=> 'small-text'
);

//! Image Brightness
$meta[] = array(
	'id'		=> '_bandit_portfolio_timthumb_brightness',
	'label'		=> 'Image Brightness (optional)',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'text',
	'class'		=> 'small-text'
);

//! Image Contrast
$meta[] = array(
	'id'		=> '_bandit_portfolio_timthumb_contrast',
	'label'		=> 'Image Contrast (optional)',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'text',
	'class'		=> 'small-text'
);

//! Crop Direction
$meta[] = array(
	'id'		=> '_bandit_portfolio_timthumb_crop',
	'label'		=> 'Crop Direction',
	'section'	=> 'portfolio-timthumb',
	'type'		=> 'select',
	'std'		=> '',
	'choices'	=> array(
		'c'	 => 'Center',
		't'	 => 'Top',
		'tl' => 'Top Left',
		'tr' => 'Top Right',
		'b'	 => 'Bottom',
		'bl' => 'Bottom Left',
		'br' => 'Bottom Right',
		'l'	 => 'Left',
		'r'	 => 'Right'
	)
);


/* Portfolio Post : Custom Thumbnail
/*---------------------------------------------------------------------------*/

$meta['sections']['portfolio-thumb'] = array(
	'title'		=> 'Portfolio Custom Thumbnail',
	'page'		=> 'portfolio'
);

//! Image URL
$meta[] = array(
	'id'		=> '_bandit_portfolio_custom_thumbnail',
	'label'		=> 'Image URL',
	'section'	=> 'portfolio-thumb',
	'type'		=> 'text'
);


/* Portfolio Post : Video
/*---------------------------------------------------------------------------*/

$meta['sections']['portfolio-video'] = array(
	'title'		=> 'Portfolio Video',
	'page'		=> 'portfolio'
);

//! Video URL
$meta[] = array(
	'id'		=> '_bandit_portfolio_video_url',
	'label'		=> 'Video URL (Recommended)',
	'section'	=> 'portfolio-video',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

//! Video Embed Code
$meta[] = array(
	'id'		=> '_bandit_portfolio_video_embed_code',
	'label'		=> 'Video Embed Code',
	'section'	=> 'portfolio-video',
	'type'		=> 'textarea',
	'rows'		=> '6'
);


/* Post Format : Audio
/*---------------------------------------------------------------------------*/

if(FeatherCore::get_option('post_format_audio')):

$meta['sections']['bandit-format-audio'] = array(
	'title'		=> 'Audio',
);

//! Audio MP3 URL
$meta[] = array(
	'id'		=> '_bandit_audio_mp3_url',
	'label'		=> 'Audio URL (MP3)',
	'section'	=> 'bandit-format-audio',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

//! Audio OGG URL
$meta[] = array(
	'id'		=> '_bandit_audio_ogg_url',
	'label'		=> 'Audio URL (OGG)',
	'section'	=> 'bandit-format-audio',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

endif;


/* Post Format : Link
/*---------------------------------------------------------------------------*/

if(FeatherCore::get_option('post_format_link')):

$meta['sections']['bandit-format-link'] = array(
	'title'		=> 'Link',
);

//! Link Title
$meta[] = array(
	'id'		=> '_bandit_link_title',
	'label'		=> 'Link Title',
	'section'	=> 'bandit-format-link',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

//! Link URL
$meta[] = array(
	'id'		=> '_bandit_link_url',
	'label'		=> 'Link URL',
	'section'	=> 'bandit-format-link',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

endif;


/* Post Format : Quote
/*---------------------------------------------------------------------------*/

if(FeatherCore::get_option('post_format_quote')):

$meta['sections']['bandit-format-quote'] = array(
	'title'		=> 'Quote',
);

//! Quote
$meta[] = array(
	'id'		=> '_bandit_quote',
	'label'		=> 'Quote',
	'section'	=> 'bandit-format-quote',
	'type'		=> 'textarea',
	'rows'		=> '4'
);

//! Quote Author
$meta[] = array(
	'id'		=> '_bandit_quote_author',
	'label'		=> 'Quote Author',
	'section'	=> 'bandit-format-quote',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

endif;


/* Post Format : Video
/*---------------------------------------------------------------------------*/

if(FeatherCore::get_option('post_format_video')):

$meta['sections']['bandit-format-video'] = array(
	'title'		=> 'Video',
);

$meta[] = array(
	'id'		=> '_bandit_video_url',
	'label'		=> 'Video URL (Recommended)',
	'section'	=> 'bandit-format-video',
	'type'		=> 'text',
	'class'		=> 'large-text'
);

$meta[] = array(
	'id'		=> '_bandit_video_embed_code',
	'label'		=> 'Video Embed Code',
	'section'	=> 'bandit-format-video',
	'type'		=> 'textarea',
	'rows'		=> '6'
);

endif;
